<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>未租房信息</title>
    <!-- Bootstrap core CSS -->
    <link th:href="@{/static/css/bootstrap.min.css}" rel="stylesheet">
</head>

<body>

<div class="container-fluid">
    <div class="row">

        <main role="main" class="col-md-9 col-lg-10 pt-3 px-4">
            <h2><a class="btn btn-sm btn-success" th:href="@{/rent/house/addHouse}">发布房源</a></h2>
            <h2>用户预约</h2>
            <div class="table-responsive">
                <div th:text="${msg}"></div>
                <table class="table table-striped table-sm">
                    <thead>
                    <tr>
                        <th>房子编号</th>
                        <th>预约人</th>
                        <th>预约人联系电话</th>
                        <th>预约留言</th>
                        <th>预约时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tr th:each="booking:${bookings}">
                        <td th:text="${booking.getHouseId()}"></td>
                       <td> <a th:href="@{/rent/user/myself/{userId}(userId=${booking.getUserId()})}">[[${booking.getUserId()}]]</a></td>
                        <td th:text="${booking.getTel()}"></td>
                        <td th:text="${booking.getMsg()}"></td>
                        <td th:text="${#dates.format(booking.getTime(),'yyyy-MM-dd')}"></td>
                        <td>
                            <a class="btn btn-sm btn-primary" th:href="@{/rent/house/success/id(houseId=${booking.getHouseId()},userId=${booking.getUserId()},bookingId=${booking.getBookingId()})}">用户满意，成功租房</a>
                            <a class="btn btn-sm btn-primary" th:href="@{/rent/booking/deleteBooking/{bookingId}(bookingId=${booking.getBookingId()})}">删除预约信息</a>
                        </td>
                    </tr>
                </table>
            </div>
        </main>
    </div>
</div>
<script type="text/javascript" src="/static/js/jquery-3.2.1.slim.min.js"></script>
<script type="text/javascript" src="/static/js/popper.min.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>

<!-- Icons -->
<script type="text/javascript" src="/static/js/feather.min.js"></script>
<script>
    feather.replace()
</script>

<!-- Graphs -->
<script type="text/javascript" src="/static/js/Chart.min.js"></script>


</body>

</html>